package com.fho4565.commands;

import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.commands.CommandSourceStack;
import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber
public class CommandRegister {
    public static CommandDispatcher<CommandSourceStack> dispatcher;

    @SubscribeEvent
    public static void onServerStaring(RegisterCommandsEvent event) {
        dispatcher = event.getDispatcher();
        Hurt.register(dispatcher);
        Mathematics.register(dispatcher);
        Player.register(dispatcher);
        Random.register(dispatcher);
        RealityTime.register(dispatcher);
        Ride.register(dispatcher);
        Run.register(dispatcher);
        World.register(dispatcher);
        HelpMcd.register(dispatcher);
        DataString.register(dispatcher);
        Explode.register(dispatcher);
        Game.register(dispatcher);
        KeyBinding.register();
        TimerCommand.register(dispatcher);
        DisMount.register(dispatcher);
        UUIDCommand.register(dispatcher);
        DisplayCommand.register(dispatcher);
    }
}
